package unit4;

//创建父类A
class A1 {
    int i = 100;
}
// 创建类A的子类B
public class Ex4_4_B1 extends A1 {
    int i = 200; //子类B的同名成员变量i
    void print() {
        System.out.println("子类中i=" + i);
        System.out.println("父类中i=" +
                           super.i); //访问父类A的同名成员变量i
    }
    public static void main(String args[]) {
        (new Ex4_4_B1()).print();
    }
}
